﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace WPClogger.Server
{
    /// <summary>
    /// Service contract for app feedback and error reporting
    /// </summary>
    [ServiceContract]
    public interface IFeedbackService
    {
        /// <summary>
        /// Reports an error
        /// </summary>
        /// <param name="message">The error message</param>
        /// <param name="stackTrace">The error stack trace</param>
        /// <param name="context">The context of the error</param>
        [OperationContract]
        void ReportError(string message, string stackTrace, AppContext context);
        /// <summary>
        /// Logs information
        /// </summary>
        /// <param name="context">The context of the app</param>
        /// <remarks>The AppContext.CustomInfo memeber can be used to store the information to be logged</remarks>
        [OperationContract]
        void LogInformation(AppContext context);
        /// <summary>
        /// Gets the current available version for an application
        /// </summary>
        /// <param name="appId">The app ID</param>
        /// <remarks>This method is intended to allow an app to check if an update is available and if so then notify the user</remarks>
        [OperationContract]
        VersionNumber GetCurrentVersion(Guid appId);
    }
}
